xen.git
18 years ago[IA64] Rename NUM_MEM_DESC to NUM_EXTRA_MEM_DESC and reduce it.
Alex Williamson [Mon, 9 Jul 2007 14:33:02 +0000 (08:33 -0600)]
[IA64] Rename NUM_MEM_DESC to NUM_EXTRA_MEM_DESC and reduce it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Removed unused __get_free_pages() and __free_pages()
Alex Williamson [Thu, 5 Jul 2007 19:38:35 +0000 (13:38 -0600)]
[IA64] Removed unused __get_free_pages() and __free_pages()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] cleanup: remove dead code.
Alex Williamson [Thu, 5 Jul 2007 19:33:03 +0000 (13:33 -0600)]
[IA64] cleanup: remove dead code.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years ago[IA64] Minor reformating and comments for vmx_fault.c
Alex Williamson [Thu, 5 Jul 2007 19:30:25 +0000 (13:30 -0600)]
[IA64] Minor reformating and comments for vmx_fault.c

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years ago[IA64] Renames vmx_process.c into vmx_fault.c
Alex Williamson [Thu, 5 Jul 2007 19:24:42 +0000 (13:24 -0600)]
[IA64] Renames vmx_process.c into vmx_fault.c

Signed-off-by: Tristan Gingold <tgingold@free.fr>
--HG--
rename : xen/arch/ia64/vmx/vmx_process.c => xen/arch/ia64/vmx/vmx_fault.c

18 years ago[IA64] Makefile fix: do not always redo .S targets.
Alex Williamson [Thu, 5 Jul 2007 19:17:30 +0000 (13:17 -0600)]
[IA64] Makefile fix: do not always redo .S targets.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years ago[IA64] Clear the key part of cr.itir
Alex Williamson [Thu, 5 Jul 2007 19:15:44 +0000 (13:15 -0600)]
[IA64] Clear the key part of cr.itir

Clear the key part of cr.itir before itc.X in alt_dtlb_miss(), alt_itlb_miss()
and frametable_miss().  Preparation for using protection keys.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
18 years ago[IA64] Fix soft lock up caused by xen_timer_interrupt()
Alex Williamson [Thu, 5 Jul 2007 19:04:00 +0000 (13:04 -0600)]
[IA64] Fix soft lock up caused by xen_timer_interrupt()

This patch intends to fix softlockup caused by xen_timer_interrupt().
This is caused by local_cpu_data->itm_next and stime_irq, itc_at_irq
inconsistency at CPU0 of hypervisor.  This patch sets stime_irq and
itc_at_irq every time in xen_timer_interrupt() to avoid this soft
lock up.

In other words, it is caused by competition of local_cpu_data->itm_next
and domain_itm in xen_timer_interrupt() and reprogram_timer() (more
specific vcpu_set_next_timer()).

For example:
 1) reprogram_timer() runs and set local_cpu_data->itm_next and set
    domain_itm as next itm.
 2) xen_timer_interrupt() called but following condition is not satisfied:
    while(time_after(ia64_get_itc(), local_cpu_data->itm_next)
    This skips stime_irq and itc_at_irq setting.
 3) goto 1)
 4) sometimes local_cpu_data->itm_next is rollback because
    ns_to_cycle()/IA64 is representing almost 32bit.
    (This occured at reprogram_timer())
 5) It causes soft lock up.
 6) Hypervisor returns to work(not hang).

To reproduce this issue, I do following configuration.

 1) boot Xen with pcpu=4 and Dom0 with vcpu=4
 2) boot domU1 with vcpu with vcpu-pin 0-1
 3) boot domU2 with vcpu with vcpu-pin 0-1
 4) run yes > /dev/null  2 process on domU1
 5) run nothing on domU2(to check softlock up occured or not)
 6) run kernel compile with -j4 on Dom0 continuously
 7) wait 4 or 8 hours to occur softlockup.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
18 years ago[IA64] Better warning fix
Alex Williamson [Tue, 3 Jul 2007 03:06:46 +0000 (21:06 -0600)]
[IA64] Better warning fix

This fixes it for gcc-3.x too.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years ago[IA64] Typo fix
Alex Williamson [Mon, 2 Jul 2007 20:29:36 +0000 (14:29 -0600)]
[IA64] Typo fix

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years agomerge with xen-unstable.hg
Alex Williamson [Mon, 2 Jul 2007 18:19:26 +0000 (12:19 -0600)]
merge with xen-unstable.hg

18 years ago[IA64] Build warning cleanup
Alex Williamson [Mon, 2 Jul 2007 16:31:03 +0000 (10:31 -0600)]
[IA64] Build warning cleanup

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years ago[IA64] Cleanup: Move is_platform_hp_ski() from xenmisc.c to xensetup.c
Alex Williamson [Mon, 2 Jul 2007 16:25:29 +0000 (10:25 -0600)]
[IA64] Cleanup: Move is_platform_hp_ski() from xenmisc.c to xensetup.c

- only caller is start_kernel
- change to static __init
- also move running_on_sim to xensetup.c, and change it from unsigned
  long to int, since it's just a boolean
- declare running_on_sim in config.h near some other externs

Tested by building, booting, starting a PV guest on rx2620.

Signed-off-by: Aron Griffis <aron@hp.com>
18 years ago[IA64] frametable_miss only exists when CONFIG_VIRTUAL_FRAME_TABLE
Alex Williamson [Mon, 2 Jul 2007 16:15:37 +0000 (10:15 -0600)]
[IA64] frametable_miss only exists when CONFIG_VIRTUAL_FRAME_TABLE

Tested by building without CONFIG_VIRTUAL_FRAME_TABLE

Signed-off-by: Aron Griffis <aron@hp.com>
18 years ago[IA64] Add ia64 ignores
Alex Williamson [Mon, 2 Jul 2007 16:13:54 +0000 (10:13 -0600)]
[IA64] Add ia64 ignores

These files are created or modified during the build.

Signed-off-by: Aron Griffis <aron@hp.com>
18 years ago[IA64] cleanup: remove unused code.
Alex Williamson [Mon, 2 Jul 2007 16:12:18 +0000 (10:12 -0600)]
[IA64] cleanup: remove unused code.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years ago[IA64] Domain debugger for VTi: virtualize ibr and dbr.
Alex Williamson [Mon, 2 Jul 2007 16:10:32 +0000 (10:10 -0600)]
[IA64] Domain debugger for VTi: virtualize ibr and dbr.

Misc cleanup.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years ago[IA64] Cleanup: remove cpu_user_regs from arch-ia64.h
Alex Williamson [Mon, 2 Jul 2007 15:54:53 +0000 (09:54 -0600)]
[IA64] Cleanup: remove cpu_user_regs from arch-ia64.h

Add a constant for isr.ni

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years ago[IA64] Fix NVRAM data cannot be saved when guest execute "reboot"
Alex Williamson [Mon, 2 Jul 2007 15:38:51 +0000 (09:38 -0600)]
[IA64] Fix NVRAM data cannot be saved when guest execute "reboot"

Also fix "xm reboot" instruction in Xend.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
18 years ago[IA64] Don't use hard wired privilege level 2 for domain kernel
Alex Williamson [Mon, 2 Jul 2007 15:29:08 +0000 (09:29 -0600)]
[IA64] Don't use hard wired privilege level 2 for domain kernel

PV domains now use CPL 1 instead of 2 for CPL 0 emulation

Signed-off-by: Juergen Gross <juergen.gross@fujitsu-siemens.com>
18 years ago[IA64] Fix incorrect NVRAM saving if domain is destroyed by config error
Alex Williamson [Mon, 2 Jul 2007 15:05:24 +0000 (09:05 -0600)]
[IA64] Fix incorrect NVRAM saving if domain is destroyed by config error

Nvram saving is always executed even if a domain is destroyed by a
configuration parameter error.  In this case, Nvram saving function
will get a bad address for the NVRAM data and save garbage into the
NVRAM file. Configuring a wrong vif parameter can expose this issue.

This patch fixes the issue by adding an address check function in
NVRAM saving path.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
18 years ago[IA64] Virtualize ibr/dbr for PV domains.
Alex Williamson [Mon, 2 Jul 2007 14:51:59 +0000 (08:51 -0600)]
[IA64] Virtualize ibr/dbr for PV domains.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years ago[IA64] Remove IA64_GUEST_CONTEXT_RBS_OFFSET
Alex Williamson [Mon, 2 Jul 2007 14:38:45 +0000 (08:38 -0600)]
[IA64] Remove IA64_GUEST_CONTEXT_RBS_OFFSET

Pass the offset in the vcpu_reg struct.
Fix displaying stack register in xenctx.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years agoFix 15435:ab95b9764b20.
Ian Campbell [Mon, 2 Jul 2007 07:42:13 +0000 (08:42 +0100)]
Fix 15435:ab95b9764b20.

The changeset did not consider about ":cdrom" and "ioemu:"
of a disk definition.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoUse 32bit operand and address during VMXAssist protected to real.
Keir Fraser [Sun, 1 Jul 2007 23:24:59 +0000 (00:24 +0100)]
Use 32bit operand and address during VMXAssist protected to real.
Signed-off-by: Xin Li <xin.b.li@intel.com>
18 years agoxm: Fix xm block-detach error message duplication.
Keir Fraser [Sun, 1 Jul 2007 21:25:27 +0000 (22:25 +0100)]
xm: Fix xm block-detach error message duplication.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoxm: Fix a typo for xm network-detach.
Keir Fraser [Sun, 1 Jul 2007 21:23:16 +0000 (22:23 +0100)]
xm: Fix a typo for xm network-detach.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoACM: Fix a problem with the boot option parser.
Keir Fraser [Sun, 1 Jul 2007 21:21:58 +0000 (22:21 +0100)]
ACM: Fix a problem with the boot option parser.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
18 years agoMake network-bridge fail on NFS or iscsi root.
Keir Fraser [Sun, 1 Jul 2007 21:20:46 +0000 (22:20 +0100)]
Make network-bridge fail on NFS or iscsi root.
Since setting up bridging involves bringing down the network interface,
bridging clearly isn't compatible with the likes of NFS or iSCSI root.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
18 years agoRemove unused VMXAssist test code.
Keir Fraser [Sun, 1 Jul 2007 21:18:04 +0000 (22:18 +0100)]
Remove unused VMXAssist test code.
Signed-off-by: Xin Li <xin.b.li@intel.com>
18 years agoxendomains: Ignore 'lost+found' when finding saved dom images.
Keir Fraser [Sun, 1 Jul 2007 21:16:41 +0000 (22:16 +0100)]
xendomains: Ignore 'lost+found' when finding saved dom images.
Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com>
18 years agoxend: Pass information to user when failing migrate due to PCI dev.
Keir Fraser [Sun, 1 Jul 2007 21:10:38 +0000 (22:10 +0100)]
xend: Pass information to user when failing migrate due to PCI dev.

When failing a migration / save due to the domain owning a PCI device
make sure that we tell the user what went wrong!

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
18 years agoxend: Don't allow migrate with assigned PCI devs.
Keir Fraser [Sun, 1 Jul 2007 21:10:13 +0000 (22:10 +0100)]
xend: Don't allow migrate with assigned PCI devs.

This can potentially cause a whole machine crash, which I think has
been seen in the wild.  The case in the wild was caused by xendomains
auto-resuming domains on reboot, so it wasn't even operator error.

There's no sane way to migrate or suspend domains with PCI devs,
so I disallow it completely.

Signed-off-by: Mark Williamson <mark.williamson@cl.cam.ac.uk>
18 years agoAdd a duplication definition check for devices.
Ian Campbell [Fri, 29 Jun 2007 13:38:18 +0000 (14:38 +0100)]
Add a duplication definition check for devices.

This patch adds a duplication definition check for devices.
It checks the following definitions.
 - vbd : uname and device name
 - vif : mac

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoxend: Fix irq-permissions setting during domain creation.
Keir Fraser [Thu, 28 Jun 2007 19:35:50 +0000 (20:35 +0100)]
xend: Fix irq-permissions setting during domain creation.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoFix fixup of invalid PTE writes, broken by 13392:0fd65225e4c6.
Ian Campbell [Thu, 28 Jun 2007 17:40:20 +0000 (18:40 +0100)]
Fix fixup of invalid PTE writes, broken by 13392:0fd65225e4c6.

By the time we test if addr is the upper word it has already been
aligned to the 8 byte pte size.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
18 years agohvm: Destroy timers early during domain death.
Keir Fraser [Wed, 27 Jun 2007 21:20:17 +0000 (22:20 +0100)]
hvm: Destroy timers early during domain death.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoMore getcpuinfo sysctl cleanup.
Keir Fraser [Wed, 27 Jun 2007 20:43:43 +0000 (21:43 +0100)]
More getcpuinfo sysctl cleanup.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoBy default allow differences between Xen and XenLinux public headers.
Keir Fraser [Wed, 27 Jun 2007 20:28:19 +0000 (21:28 +0100)]
By default allow differences between Xen and XenLinux public headers.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoSmall sysctl cleanups.
Keir Fraser [Wed, 27 Jun 2007 20:27:51 +0000 (21:27 +0100)]
Small sysctl cleanups.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoxenconsoled: improve robustness of logfile handling
Keir Fraser [Wed, 27 Jun 2007 20:05:54 +0000 (21:05 +0100)]
xenconsoled: improve robustness of logfile handling

Check the 'log_reload' on every iteration of the select() loop, not just when
select() returns EINTR. This is because the log reload signal may have
iterrupted a syscall other than select & thus without this change  we
might miss the reload signal.  The second change makes us process the
hypervisor logs on every iteration of the loop, not just upon timeouts.
This is because if a guest VM were consistently sending some log message
and < 1 second period, the select() would never hit the 1 second timeout
and thus never process the HV logs.

Thanks to Markus Armbruster for pointing out both these edge cases

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
18 years agoAdd new sysctl to return runtime information about physical CPU utilization.
Steven Hand [Wed, 27 Jun 2007 20:01:08 +0000 (21:01 +0100)]
Add new sysctl to return runtime information about physical CPU utilization.

Signed-off-by: Steven Hadn <steven@xensource.com>
18 years agovmx: Exclude VMX_PROCBASED_CTL2 from set of MSRs a VMX guest is allowd
Keir Fraser [Wed, 27 Jun 2007 19:56:25 +0000 (20:56 +0100)]
vmx: Exclude VMX_PROCBASED_CTL2 from set of MSRs a VMX guest is allowd
to access.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agovmx: Make use of VMX_INSTRUCTION_INFO field to obtain the segment
Keir Fraser [Wed, 27 Jun 2007 19:53:57 +0000 (20:53 +0100)]
vmx: Make use of VMX_INSTRUCTION_INFO field to obtain the segment
register of OUTS

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agohvm: Sync SVM CR4 handling with VMX.
Keir Fraser [Wed, 27 Jun 2007 19:17:54 +0000 (20:17 +0100)]
hvm: Sync SVM CR4 handling with VMX.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoFix VMX guest can't boot after MCE enabled.
Keir Fraser [Wed, 27 Jun 2007 19:08:21 +0000 (20:08 +0100)]
Fix VMX guest can't boot after MCE enabled.
Signed-off-by: Xin Li <xin.b.li@intel.com>
18 years agox86: remove unused nopaging_gdt_descr
Keir Fraser [Wed, 27 Jun 2007 19:00:50 +0000 (20:00 +0100)]
x86: remove unused nopaging_gdt_descr
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
18 years agoRemove incorrect __init prefixes
Keir Fraser [Wed, 27 Jun 2007 18:59:21 +0000 (19:59 +0100)]
Remove incorrect __init prefixes

Following functions can be __init in Linux, however shouldn't
in Xen. __print_IO_APIC is called by keyhandler, while
setup_ioapic_dest is invoked in one platform hypercall.

Signed-off-by Kevin Tian <kevin.tian@intel.com>

18 years ago[MINIOS][IA64] mini-os without linux-optimization in hypervisor
Alex Williamson [Tue, 26 Jun 2007 22:24:41 +0000 (16:24 -0600)]
[MINIOS][IA64] mini-os without linux-optimization in hypervisor

Make mini-os runnable again without the special linux optimization for the
identity mapping in the hypervisor.

Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
18 years agolibxc: Add xc_domain_setdebugging in xenctrl API
Alex Williamson [Tue, 26 Jun 2007 22:18:28 +0000 (16:18 -0600)]
libxc: Add xc_domain_setdebugging in xenctrl API

Use it in xc_ptrace.c

Signed-off-by: Tristan Gingold <tgingold@free.fr>
Acked-by: Keir Fraser <keir@xensource.com>
18 years ago[VMX] Set up GUEST_CR0 as well as CR0_READ_SHADOW when restoring saved
Tim Deegan [Tue, 26 Jun 2007 16:54:10 +0000 (17:54 +0100)]
[VMX] Set up GUEST_CR0 as well as CR0_READ_SHADOW when restoring saved
vcpus.  Also simplify the CR3 reload path.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
18 years agoDeinitialize timers before destroying the local apic; this protects us
Steven Hand [Tue, 26 Jun 2007 11:40:37 +0000 (12:40 +0100)]
Deinitialize timers before destroying the local apic; this protects us
against a late firing timer callback function (e.g. hpet_timer_fn) which
tries to access local APIC state.

Signed-off-by: Steven Hand <steven@xensource.com>
18 years agoioemu: Fix ifdef __x86_64__
kfraser@localhost.localdomain [Mon, 25 Jun 2007 15:52:39 +0000 (16:52 +0100)]
ioemu: Fix ifdef __x86_64__
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[IA64] clean warnings
Alex Williamson [Fri, 22 Jun 2007 17:48:49 +0000 (11:48 -0600)]
[IA64] clean warnings

This effectively reverts the io_init.c changes from
ia64/xen-unstable.hg cset 15376:39a95178edbf

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
18 years ago[IA64] Enable PV domain debugging.
Alex Williamson [Fri, 22 Jun 2007 17:44:44 +0000 (11:44 -0600)]
[IA64] Enable PV domain debugging.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years ago[IA64] More SN2 SAL calls that needs to be emulated.
Alex Williamson [Thu, 21 Jun 2007 22:50:55 +0000 (16:50 -0600)]
[IA64] More SN2 SAL calls that needs to be emulated.

Signed-off-by: Jes Sorensen <jes@sgi.com>
18 years ago[IA64] Many more registers displayed (through a command-line option).
Alex Williamson [Thu, 21 Jun 2007 22:45:41 +0000 (16:45 -0600)]
[IA64] Many more registers displayed (through a command-line option).

Signed-off-by: Tristan Gingold <tgingold@free.fr>
Acked-by: Keir Fraser <keir@xensource.com>
18 years agoi386: Simplify failsafe callback handling.
kfraser@localhost.localdomain [Thu, 21 Jun 2007 20:36:26 +0000 (21:36 +0100)]
i386: Simplify failsafe callback handling.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoFix x86/64 failsafe callback handling.
kfraser@localhost.localdomain [Thu, 21 Jun 2007 17:02:50 +0000 (18:02 +0100)]
Fix x86/64 failsafe callback handling.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agohvm svm: No guest access to SVM MSRs.
kfraser@localhost.localdomain [Thu, 21 Jun 2007 14:17:31 +0000 (15:17 +0100)]
hvm svm: No guest access to SVM MSRs.
Signed-off-by: Mats Petersson <mats.petersson@amd.com>
18 years agox86: machine check exception handling
kfraser@localhost.localdomain [Thu, 21 Jun 2007 14:10:04 +0000 (15:10 +0100)]
x86: machine check exception handling

Properly handle MCE (connecting the exisiting, but so far unused
vendor specific handlers). HVM guests don't own CR4.MCE (and hence
can't suppress the exception) anymore, preventing silent machine
shutdown.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agox86: clear guest's EFLAGS.RF after emulating instructions
kfraser@localhost.localdomain [Thu, 21 Jun 2007 13:03:57 +0000 (14:03 +0100)]
x86: clear guest's EFLAGS.RF after emulating instructions
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoi386: remove NMI deferral by instead making sure selector registers
kfraser@localhost.localdomain [Thu, 21 Jun 2007 11:13:06 +0000 (12:13 +0100)]
i386: remove NMI deferral by instead making sure selector registers
are always stored/restored correctly despite the potential for an NMI
(and also MCE, with a subsequent patch) to kick in.

The idea is to always check values read from %ds and %es against
__HYPERVISOR_DS, and only store into the current frame (all normal
handlers) or the outer-most one (NMI and MCE) if the value read is
different. That way, any NMI or MCE occurring during frame setup will
store selectors not saved so far on behalf of the interrupted handler,
with that interrupted handler either having managed to read the guest
selector (in which case it can store it regardless of whether NMI/MCE
kicked in between the read and the store) or finding __HYPERVISOR_DS
already in the register, in which case it'll know not to store (as the
nested handler would have done the store).

For the restore portion this makes use of the fact that there's
exactly one such code sequence, and by moving the selector restore
part past all other restores (including all stack pointer adjustments)
the NMI/MCE handlers can safely detect whether any selector would have
been restored already (by range checking EIP) and move EIP back to the
beginning of the selector restore sequence without having to play with
the stack pointer itself or any other gpr.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agolibxenguest: Add another range check to dom restore.
kfraser@localhost.localdomain [Thu, 21 Jun 2007 11:10:01 +0000 (12:10 +0100)]
libxenguest: Add another range check to dom restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agolibxenguest: Add missing range-check on count field read from a domain
kfraser@localhost.localdomain [Thu, 21 Jun 2007 08:47:39 +0000 (09:47 +0100)]
libxenguest: Add missing range-check on count field read from a domain
save/restore file.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agomerge with xen-unstable.hg
Alex Williamson [Wed, 20 Jun 2007 18:49:27 +0000 (12:49 -0600)]
merge with xen-unstable.hg

18 years ago[IA64] sn2 global_tlb_purge implementation
Alex Williamson [Wed, 20 Jun 2007 18:47:52 +0000 (12:47 -0600)]
[IA64] sn2 global_tlb_purge implementation

Very simple global tlb purge implementation for SN2. ptcga isn't
propagated between nodes so IPI a CPU on each node to get the job
done. This is _slow_ and inefficient, but it works for now.

Signed-off-by: Jes Sorensen <jes@sgi.com>
18 years agoRename ddc_info -> vbeddc_info in interface header.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 18:31:37 +0000 (19:31 +0100)]
Rename ddc_info -> vbeddc_info in interface header.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoAdd hypercall function for retrieving EDID info
kfraser@localhost.localdomain [Wed, 20 Jun 2007 18:24:08 +0000 (19:24 +0100)]
Add hypercall function for retrieving EDID info
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoRemove stray semi-colon in macro.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 18:08:45 +0000 (19:08 +0100)]
Remove stray semi-colon in macro.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agox86: Add hypercall function for retrieving EDD info.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 17:43:04 +0000 (18:43 +0100)]
x86: Add hypercall function for retrieving EDD info.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agotools: Adjust tools' path calculation.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 16:07:15 +0000 (17:07 +0100)]
tools: Adjust tools' path calculation.

I'm suggesting this change to make another tiny step towards the
ability to run the tools e.g. out of the build tree (so that multiple
different Xen versions can co-exist without the requirement to
re-install the respective version with each boot).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agox86: early exception enhancement
kfraser@localhost.localdomain [Wed, 20 Jun 2007 16:05:48 +0000 (17:05 +0100)]
x86: early exception enhancement

In order to at least have some minimal debuging capabilities when Xen
crashes really early, dump out registers and stack contents in a raw
form.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agotools: Create directory /var/lib/xen at install target.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 15:58:21 +0000 (16:58 +0100)]
tools: Create directory /var/lib/xen at install target.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agokernel command line extension
kfraser@localhost.localdomain [Wed, 20 Jun 2007 15:52:01 +0000 (16:52 +0100)]
kernel command line extension

In order to allow appending to the dom0 command line even with boot
loaders that only allow editing the kernel (i.e. Xen in our case)
command line, support a '--' separator option.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agox86: introduce specialized clear_page()
kfraser@localhost.localdomain [Wed, 20 Jun 2007 15:18:03 +0000 (16:18 +0100)]
x86: introduce specialized clear_page()

More than doubles performance of page clearing on not too old
processors (SSE2 supported).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoUse clear_page() wherever possible/reasonable instead of open coded
kfraser@localhost.localdomain [Wed, 20 Jun 2007 14:33:14 +0000 (15:33 +0100)]
Use clear_page() wherever possible/reasonable instead of open coded
memset() calls (likewise a few replacements memcpy -> copy_page).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoEnhance guest memory accessor macros so that source operands can be
kfraser@localhost.localdomain [Wed, 20 Jun 2007 14:29:53 +0000 (15:29 +0100)]
Enhance guest memory accessor macros so that source operands can be
pointers to const or arrays.

Only build-tested on ia64, and untested for powerpc (which, however,
is almost identical to ia64, except for an apparent bug in the original
version of __copy_field_{from,to}_guest in that the field offset was
multiplied by the field size).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agox86: Use 64-bit arithmetic in reserve_in_boot_e820().
kfraser@localhost.localdomain [Wed, 20 Jun 2007 14:08:32 +0000 (15:08 +0100)]
x86: Use 64-bit arithmetic in reserve_in_boot_e820().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agohvm/x86: vendor-specific code can call vendor-specific routines directly
kfraser@localhost.localdomain [Wed, 20 Jun 2007 14:06:17 +0000 (15:06 +0100)]
hvm/x86: vendor-specific code can call vendor-specific routines directly
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agox86/hvm: determine shared info format earlier.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 14:03:39 +0000 (15:03 +0100)]
x86/hvm: determine shared info format earlier.

Latch guest shared info format when hypercall page is being set up
rather than during an arbitrarily selected hypercall.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agox86: fix early option scanning
kfraser@localhost.localdomain [Wed, 20 Jun 2007 13:57:49 +0000 (14:57 +0100)]
x86: fix early option scanning

Make sure command lines like
... vgaxyz vga=
... console=vga vga=
do not mistakenly ignore the vga= option due to finding 'vga' earlier
on the line.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoFix xm vcpu-set command for managed domains, to take effect immediately.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 13:43:41 +0000 (14:43 +0100)]
Fix xm vcpu-set command for managed domains, to take effect immediately.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agohvm: Ensure ioemu sees media-change events even when media filename
kfraser@localhost.localdomain [Wed, 20 Jun 2007 13:41:27 +0000 (14:41 +0100)]
hvm: Ensure ioemu sees media-change events even when media filename
remains constant my writing a dummy blank string first.
Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
18 years agohvm: Fix ioemu Qcow support.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 13:36:11 +0000 (14:36 +0100)]
hvm: Fix ioemu Qcow support.

Normally by default, SIGUSR2 is not blocked, so the signal masks of
SIGUSR2 in all threads is unblocked.

When creating HVM guest, if we use the Qcow format image file, in the
main thread, Qcow uses SIGUSR2 to be notified of the completion of the
request after it issues an AIO request; in tools/ioemu/block.c:
bdrv_read_em(), in some point between bdrv_aio_read() and
qemu_aio_wait(), Dom0 may send a SIGUSR2 to Qemu immediately to
indicate the completion of an AIO request -- since at the moment
SIGUSR2 in main thread is blocked by qemu_aio_wait_start(), the signal
may be delivered to one non-main thread, causing the signal handler of
SIGUSR2 is invoked, then the main thread hangs in
qemu_aio_wait()->syswait()...

This patch blocks SIGUSR2 at the beginning of Qemu's main(), so it
ensures SIGUSR2 is blocked by default when a new thread is created,
then only the threads that use the signal unblock it.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
18 years ago32-on-64: First slot of hidden L4 page directory must start life as zero.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 12:39:54 +0000 (13:39 +0100)]
32-on-64: First slot of hidden L4 page directory must start life as zero.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago32-on-64: Fix error path where we fail to successfully switch a guest
kfraser@localhost.localdomain [Wed, 20 Jun 2007 12:38:48 +0000 (13:38 +0100)]
32-on-64: Fix error path where we fail to successfully switch a guest
into compat mode.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago32-on-64: Fix error path from memory_op() hypercall.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 12:38:22 +0000 (13:38 +0100)]
32-on-64: Fix error path from memory_op() hypercall.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agohvm: Support injection of virtual NMIs and clean up ExtInt handling in general.
kfraser@localhost.localdomain [Wed, 20 Jun 2007 10:50:16 +0000 (11:50 +0100)]
hvm: Support injection of virtual NMIs and clean up ExtInt handling in general.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years ago[HVM][SVM] flush all entries from guest ASIDs when xen writes CR3.
Tim Deegan [Wed, 20 Jun 2007 09:55:37 +0000 (10:55 +0100)]
[HVM][SVM] flush all entries from guest ASIDs when xen writes CR3.
This makes the assumptions about TLB flush behaviour in the page-type
system and the shadow code safe again, and fixes a corner case of NPT
log-dirty.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
18 years ago[IA64] Enable more sn2 features under Xen
Alex Williamson [Tue, 19 Jun 2007 21:17:20 +0000 (15:17 -0600)]
[IA64] Enable more sn2 features under Xen

Signed-off-by: Jes Sorensen <jes@sgi.com>
18 years agox86: retrieve VBE EDID/DDC info independent of used video mode
kfraser@localhost.localdomain [Tue, 19 Jun 2007 17:07:53 +0000 (18:07 +0100)]
x86: retrieve VBE EDID/DDC info independent of used video mode

The code to retrieve this information was protected by a check of a
variable (vbe_version) that would get initialized only when a VESA
mode was selected on the command line.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
At the same time I cleaned up use of 'scratch space' at address
modelist and beyond.

Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoblktap: Add fallback code to blktap for missing poll-on-aio support.
kfraser@localhost.localdomain [Tue, 19 Jun 2007 15:32:28 +0000 (16:32 +0100)]
blktap: Add fallback code to blktap for missing poll-on-aio support.

blktap requires a xen specific kernel AIO ABI which has been vetoed by
upstream in favour of another approach. Rather than include this ABI,
Fedora has been carrying a patch which makes tap:aio use a thread to
poll for aio events and notify the main thread via a pipe.

The upstream approach of allowing io_getevents() poll normal file
descriptors via epoll is still progressing:
 http://lkml.org/lkml/2007/1/3/16

but when that does make it upstream, blktap will require significant
re-working to use that approach.

In the meantime, here's a patch which uses the poll-in-a-thread
approach only if AIO poll support isn't available. It also hides the
details behind a simple abstraction and makes both tap:aio and
tap:qcow use it.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
18 years agotools: Allow xendomains to handle domain names >16 characters
kfraser@localhost.localdomain [Tue, 19 Jun 2007 15:29:22 +0000 (16:29 +0100)]
tools: Allow xendomains to handle domain names >16 characters

The xendomains init script parses the output of "xm list", and
since xm list restricts the length of domains to 16 characters the
xendomain script cannot handle long domain names.

This patch makesit parse the output of "xm list -l" instead.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
18 years agoioemu: Assembler memcpy() for x86, and lowest-common-denominator
kfraser@localhost.localdomain [Tue, 19 Jun 2007 15:08:15 +0000 (16:08 +0100)]
ioemu: Assembler memcpy() for x86, and lowest-common-denominator
memcpy() function for all others, avoiding noisy longword copies on
ia64.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agotools: Fix compiler warning.
kfraser@localhost.localdomain [Tue, 19 Jun 2007 14:55:13 +0000 (15:55 +0100)]
tools: Fix compiler warning.
From: Charles Coffing <ccoffing@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agohvm svm: Log into 'xm dmesg' that SVM NPT is enabled.
kfraser@localhost.localdomain [Tue, 19 Jun 2007 14:39:08 +0000 (15:39 +0100)]
hvm svm: Log into 'xm dmesg' that SVM NPT is enabled.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agox86: Re-introduce VIDEO_CURRENT_MODE into video.S video-mode-setting
kfraser@localhost.localdomain [Tue, 19 Jun 2007 14:09:59 +0000 (15:09 +0100)]
x86: Re-introduce VIDEO_CURRENT_MODE into video.S video-mode-setting
code, and make visible at the command line via 'vga=current'.
Signed-off-by: Keir Fraser <keir@xensource.com>
18 years agoFurther fixes for 32on64 bit kexec.
Ian Campbell [Tue, 19 Jun 2007 14:03:55 +0000 (15:03 +0100)]
Further fixes for 32on64 bit kexec.

* switch to a suitable stack before jumping to compatibility mode.
* return the correct range for KEXEC_RANGE_MA_XEN.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
18 years agohvm: Fix deadlock in vpt.c and clean up some more.
kfraser@localhost.localdomain [Tue, 19 Jun 2007 13:52:53 +0000 (14:52 +0100)]
hvm: Fix deadlock in vpt.c and clean up some more.
Signed-off-by: Keir Fraser <keir@xensource.com>